﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Data.Linq;
using System.Configuration;
using System.Collections.Concurrent;
using System.Text;

namespace YLPublicService
{
    public abstract partial class ServiceBase<Tuser>
    {
        protected IEnumerable<WorkItemType> getWorkItems<WorkItemType>(Func<View_UserAndItem, bool> predicate, Func<View_UserAndItem, WorkItemType> selector)
        {
            var items = dbContext.View_UserAndItems
                .Where(predicate)
                .Select(ui =>
                   selector(ui)
                    );
            return items;
        }



    }
}